package com.woniuxy.consumeserver.controller;

import com.woniuxy.consumeserver.service.FinanceConsumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

@RestController
public class ConsumeController {
    @Resource
    private FinanceConsumeService financeConsumeService;
    /**
     * 分期数据和
     * @param userId
     * @param orderId
     * @param amount
     * @return
     */
    @PostMapping("/payPlan")
    public Boolean payPlan(Long userId, Long orderId, BigDecimal amount){
        return financeConsumeService.payPlan(userId,orderId,amount);
    }
}
